<template>
  <div>

    <input v-model="msg" />
    <Child :msg="msg"></Child>
  </div>
</template>

<script setup>
import { onBeforeMount, onBeforeUpdate, onMounted, onUpdated, ref } from "vue";
import Child from "./child.vue";

const msg = ref('2')

const show = ref(false)

onBeforeMount(()=>{
  console.log('beforemount parent')
})

onMounted(()=>{

  console.log(111,document.cookie)

  console.log(333,sessionStorage.getItem('name'))

  console.log('mount parent')

  setTimeout(() => {

    msg.value=666


    show.value=true
    
  }, 1000);

})

onBeforeUpdate(()=>{
  console.log('onBeforeUpdate parent')
})

onUpdated(()=>{
  console.log('onUpdated parent')
})



</script>
